package com.syq.service.impl;


import com.syq.bean.Student;
import com.syq.dao.StudentDao;
import com.syq.dao.UsersDao;
import com.syq.dao.impl.StudentDaoImpl;
import com.syq.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao = new StudentDaoImpl();
    @Override
    public List<Student> getStudents(String stuName,String stuNo,int sex,int pageIndex,int pageSize) {

        return studentDao.getStudents(stuName,stuNo,sex,pageIndex,pageSize);
    }

    @Override
    public int total(String stuName, String stuNo, int sex) {

        return studentDao.total(stuName,stuNo,sex);
    }

    @Override
    public int insertStu(Student student) {

        return studentDao.insertStu(student);
    }

    @Override
    public Student findById(int sid) {
        return studentDao.findById(sid);
    }

    @Override
    public int updateStu(Student student) {
        return studentDao.updateStu(student);
    }

    @Override
    public int delStu(String sid) {

        return studentDao.delStu(sid);
    }

    @Override
    public Student finByNo(String sno) {
        return studentDao.finByNo(sno);
    }
}
